package com.singi.intercept;

import com.eova.aop.AopContext;
import com.jfinal.core.Controller;
import com.jfinal.kit.StrKit;
import com.pro.global.BaseMetaObjectIntercept;

/*
 * Created by Administrator on 2020-5-9.
 */
public class StoreIntercept extends BaseMetaObjectIntercept {
    @Override
    public void queryBefore(AopContext ac) throws Exception {
        Controller ctrl = ac.ctrl;
        String is_hot = ctrl.getPara("query_v_is_hot");
        if ("80".equals(is_hot)){
            ac.condition = " and ifnull(is_hot,0) = 1";
        }else if ("81".equals(is_hot)){
            ac.condition = " and ifnull(is_hot,0) = 0";
        }
        super.queryBefore(ac);
    }
}
